import vue from "@vitejs/plugin-vue";
import path from "path";
import { defineConfig } from "vite";

export default defineConfig({
    resolve: {
        alias: {
            "~/": `${path.resolve(__dirname, "src")}/`,
        },
    },
    css: {
        postcss: {
            plugins: [{
                postcssPlugin: 'internal:charset-removal',
                AtRule: {
                    charset: (atRule) => {
                        if (atRule.name === 'charset') atRule.remove();
                    }
                }
            }]
        }
    },
    plugins: [
        vue(),
    ],
    server: {
        host: "0.0.0.0",
        port: 9021,
        open: false,
        https: false,
    },
});
